class_name VFXInfo
extends Resource

@export var id:String
@export var name:String
@export var desc:String
@export var vfx_scene:PackedScene

#region 运行时属性
# 播放id
var play_id:int
# 持续时间
var duration:float
# 是否附加到目标上（切换父节点为target）
var is_attached:bool
# 附加的目标
var target:Node
# 位置偏移
var offest:Vector2
# 旋转（弧度）
var rotation:float
# 开始Tick
var start_tick:int
#endregion

## 初始化运行时属性
func init(play_id:int,duration:float,target:Node = null,is_attached:bool = false,offest:Vector2 = Vector2.ZERO,rotation:float = 0):
	self.play_id = play_id
	self.duration = duration
	self.is_attached = is_attached
	self.target = target
	self.offest = offest
	self.rotation = rotation
	self.start_tick = Time.get_ticks_msec()
